#ifndef UI_CLMARKWIDGET_HPP
#define UI_CLMARKWIDGET_HPP

#include <QWidget>

class QLayout;

namespace cl {

    class Platform;
    class Device;
}

namespace ui {

    class InfoWidget;
    class BenchmarkWidget;

    /** @brief The CLMarkWidget class. */
    class CLMarkWidget : public QWidget {

        Q_OBJECT

    public:

        /** @brief CLMarkWidget container.
         * @param parent */
        CLMarkWidget(QWidget *parent = 0);

        /** @brief setPlatform selection.
         * @param platform */
        void setPlatform(const cl::Platform &platform);

        /** @brief setDevice selection.
         * @param device */
        void setDevice(const cl::Device &device);

        /** @brief showInfo of current selected platform and device. */
        void showInfo(void);

        /** @brief showBenchmark of current selected platform and device. */
        void showBenchmark(void);

    signals:

        void isLocked(bool);

    private slots:

        void onIsRunning(bool result);

    private:
        QLayout     *infoWidgetHolder;
        InfoWidget  *infoWidget;
        QLayout *benchmarkWidgetHolder;
        BenchmarkWidget *benchmarkWidget;
        const cl::Platform *platform;
        const cl::Device   *device;
    };
}

#endif // UI_CLMARKWIDGET_HPP
